package com.movies.repository;


import com.movies.model.MovieUser;
import com.movies.model.MovieUserRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Set;

/**
 * Created by chemeng on 2017/3/11.
 */
@Repository
public interface UserMapper {

    void addUser(MovieUser user);

    void grantUser(@Param("username") String username, @Param("authority") String authority);

    MovieUser findByUsername(@Param("username") String username);

    Set<MovieUserRole> getAuthorities(@Param("username") String username);
}
